package org.shangrila.app.sys.eo;

import java.io.Serializable;
import javax.persistence.*;
import java.util.List;


/**
 * The persistent class for the SYS_RESOURCES database table.
 * 
 */
@Entity
@Table(name="SYS_RESOURCES")
@NamedQuery(name="SysResource.findAll", query="SELECT s FROM SysResource s")
public class SysResource implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	private long id;

	private String category;

	private String flag;

	private String icon;

	private String name;

	private String source;

	//bi-directional many-to-many association to SysAuthority
	@ManyToMany
	@JoinTable(
		name="SYS_AUTHORITY_RESOURCE"
		, joinColumns={
			@JoinColumn(name="RESOURCEID")
			}
		, inverseJoinColumns={
			@JoinColumn(name="AUTHORITYID")
			}
		)
	private List<SysAuthority> sysAuthorities;

	public SysResource() {
	}

	public long getId() {
		return this.id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public String getCategory() {
		return this.category;
	}

	public void setCategory(String category) {
		this.category = category;
	}

	public String getFlag() {
		return this.flag;
	}

	public void setFlag(String flag) {
		this.flag = flag;
	}

	public String getIcon() {
		return this.icon;
	}

	public void setIcon(String icon) {
		this.icon = icon;
	}

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getSource() {
		return this.source;
	}

	public void setSource(String source) {
		this.source = source;
	}

	public List<SysAuthority> getSysAuthorities() {
		return this.sysAuthorities;
	}

	public void setSysAuthorities(List<SysAuthority> sysAuthorities) {
		this.sysAuthorities = sysAuthorities;
	}

}